package com.kobe.tokendemo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 创建 JYQ  on  2018/11/1,17:20
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultWrapper {
    private  boolean status;
    private  int code;
    private  String message;
    private  Object data;
    public  static  ResultWrapper success(Object data){
        return  new ResultWrapper(true,200,"ok",data);
    }
    public  static  ResultWrapper  error(int code,String message){
        return  new ResultWrapper(false,code,message,null);
    }

}
